<template>
  <div class="rexipelb">
    <div class="rexipelb_box">
      <div class="rexipelb_one">
        <span class="el-icon-tableware"></span>
      </div>
      <h1>心食谱 新味道 心动不已</h1>
    </div>
    <recipe-cx v-for="i in datalist" :key="i.cid" :sp="i" />
  </div>
</template>

<script>
import RecipeCx from "@/components/RecipeCx.vue";
export default {
  components: { RecipeCx },
  data() {
    return {
      datalist: [],
    };
  },
  methods: {
    getlist() {
      let url = "/fllist";
      this.axios.get(url).then((res) => {
        // console.log(res);
        this.datalist = res.data.data;
      });
    },
  },
  mounted() {
    this.getlist();
  },
};
</script>

<style lang="scss" scoped>
.rexipelb {
  width: 1200px;
  margin: 0 auto;
  h1 {
    width: 330px;
    height: 50px;
    font-size: 30px;
    margin: 20px 0;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
  }
}
.rexipelb_box {
  display: flex;
  align-items: center;
  background-color: #f1f1f1;
  margin-bottom: 20px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
.rexipelb_one {
  width: 50px;
  height: 50px;
  background-color: #ffe851;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  margin-left: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>